import request from '@/utils/request'

// 查询客户和树的中间表列表
export function listCrmtcmid(query) {
  return request({
    url: '/system/crmtcmid/list',
    method: 'get',
    params: query
  })
}

export function listCrmtcmidpz(query) {
  return request({
    url: '/system/crmtcmid/listpz',
    method: 'get',
    params: query
  })
}

export function deleteCrmtcmidpz(query) {
  return request({
    url: '/system/crmtcmid/deletepz',
    method: 'get',
    params: query
  })
}

// 查询客户和树的中间表详细
export function getCrmtcmid(id) {
  return request({
    url: '/system/crmtcmid/' + id,
    method: 'get'
  })
}

// 新增客户和树的中间表
export function addCrmtcmid(data) {
  return request({
    url: '/system/crmtcmid',
    method: 'post',
    data: data
  })
}

// 修改客户和树的中间表
export function updateCrmtcmid(data) {
  return request({
    url: '/system/crmtcmid',
    method: 'put',
    data: data
  })
}

// 删除客户和树的中间表
export function delCrmtcmid(id) {
  return request({
    url: '/system/crmtcmid/' + id,
    method: 'delete'
  })
}
